//
//  GGDeviceAddFellowViewController.m
//  DDLock
//
//  Created by ios on 2017/12/29.
//  Copyright © 2017年 saiyi. All rights reserved.
//

#import "GGDeviceAddFellowViewController.h"

@interface GGDeviceAddFellowViewController ()<UISearchBarDelegate>

@property (nonatomic, strong) UISearchBar *searchBar;

@end

@implementation GGDeviceAddFellowViewController

- (void)setDidLoad {
    [super setDidLoad];
    // 添加朋友

    UIBarButtonItem *rightItem = [[UIBarButtonItem alloc] initWithTitle:@"取消" style:UIBarButtonItemStyleDone target:self action:@selector(clickCanle)];
    self.navigationItem.rightBarButtonItem = rightItem;

    UISearchBar *searchBar = [[UISearchBar alloc] init];
    self.searchBar = searchBar;
//    searchBar.frame = CGRectMake(0, 0, kScreenW, 44);
    searchBar.placeholder = @"搜索用户";
    searchBar.backgroundColor = [UIColor orangeColor];
    self.navigationItem.titleView = searchBar;
    
    
    
    
    
    UITextField *searchField = [[UITextField alloc] init];
    searchField.placeholder = @"🔍搜索用户";
    searchField.borderStyle = UITextBorderStyleRoundedRect;
    searchField.backgroundColor = [UIColor whiteColor];
    self.navigationItem.titleView = searchField;
    searchField.gg_width = kScreenW - 120;
    
}

- (void)setWillAppear {
    
    self.searchBar.frame = CGRectMake(0, 0, kScreenW, 44);

}


#pragma mark - action
// 取消
- (void)clickCanle {
    
    [self.view endEditing:YES];
}

@end
